/**
 * Project Name:javaBaseReview
 * Package Name:com.xuwei.base.link
 * author:David
 * Date:2015年6月14日下午1:31:14
 * Copyright (c) 2015, xw123box@126.com All Rights Reserved.
 *
 */
package com.xuwei.base.link;

/**
 * 双向链表结点类
 * @author David
 * @since 2015年6月14日 下午1:31:14
 * @version 
 * @since JDK 1.6
 */
public class DLNode implements Node{
	private int val;
	private DLNode prior;// 前驱
	private DLNode rear;// 后继
	private Object data;//数据

	public DLNode(){
		this(null,null,null);
	}
	
	public DLNode(Object data, DLNode prior, DLNode rear) {
		this.data = data;
		this.prior = prior;
		this.rear = rear;
	}

	public int getVal() {
		return val;
	}

	public void setVal(int val) {
		this.val = val;
	}

	public DLNode getPrior() {
		return prior;
	}

	public void setPrior(DLNode prior) {
		this.prior = prior;
	}

	public DLNode getRear() {
		return rear;
	}

	public void setRear(DLNode rear) {
		this.rear = rear;
	}

	@Override
	public Object getData() {
		return data;
	}

	@Override
	public void setData(Object data) {
		this.data = data;
	}

}
